package com.castle.fortress.admin.study.exam.mapper;

import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.castle.fortress.admin.study.exam.entity.StudyQuestionEntity;
import java.util.Map;
import java.util.List;
/**
 * 题目Mapper 接口
 *
 * @author castle
 * @since 2023-02-10
 */
public interface StudyQuestionMapper extends BaseMapper<StudyQuestionEntity> {

    /**
    * 扩展信息列表
    * @param pageMap
    * @param studyQuestionEntity
    * @return
    */
    List<StudyQuestionEntity> extendsList(@Param("map")Map<String, Long> pageMap, @Param("studyQuestionEntity") StudyQuestionEntity studyQuestionEntity);

    /**
    * 扩展信息记录总数
    * @param studyQuestionEntity
    * @return
    */
    Long extendsCount(@Param("studyQuestionEntity") StudyQuestionEntity studyQuestionEntity);

    /**
    * 题目扩展详情
    * @param id 题目id
    * @return
    */
    StudyQuestionEntity getByIdExtends(@Param("id")Long id);


    Integer updateStudyQuestionSort(@Param("id")Long id, @Param("sort")Integer sort);

    /**
     * 删除指定题库分类下的题目
     * @param typeId
     */
    void delByQuestionTypeId(@Param("typeId")Long typeId);
}
